# vim: set ft=sh :

# Open default editor with the given parameters.

if [[ -z "$EDITOR" ]]; then
    echo "e: you don't have a default editor. Set one in the \$EDITOR variable"
    return 1
fi

# Edit the current directory if no parameters are given.
if [[ $# -eq 0 ]]; then
    $EDITOR .
else
    $EDITOR "$@"
fi
